<?php

use app\assets\BackendAsset as Asset;

?>
    <el-container class="wp-form-container">
        <el-header class="top-wrapper no-pb bg-white" height="auto" ref="mainScrollShadow">
            <el-row :inline="true" class="button-container">
                <el-col>
                    <el-breadcrumb separator="/">
                        <el-breadcrumb-item>
                            <a @click="goToIndex"><i class="el-icon-location-outline"></i>&nbsp;首页</a>
                        </el-breadcrumb-item>
                        <el-breadcrumb-item>
                            <a @click="cancel">&nbsp;轮播图分类管理</a>
                        </el-breadcrumb-item>
                        <el-breadcrumb-item @dblclick.native="window.open(window.location.href)">
                            详情
                        </el-breadcrumb-item>
                    </el-breadcrumb>
                </el-col>
            </el-row>
        </el-header>
        <el-main class="content-wrapper transits bg-white ph-30" v-if="!isError">
            <div class="mt-20"></div>
            <el-descriptions title="基础信息">
                <el-descriptions-item label='编号'>
                    <span v-text="detail.id"></span>
                </el-descriptions-item>
                <el-descriptions-item label='作者编号'>
                    <span v-text="detail.user_id"></span>
                </el-descriptions-item>
                <el-descriptions-item label='分类编号'>
                    <span v-text="detail.cate_id"></span>
                </el-descriptions-item>
                <el-descriptions-item label='标题'>
                    <span v-text="detail.title"></span>
                </el-descriptions-item>
                <el-descriptions-item label='列表页封面'>
                    <el-image class="thumb" :preview-src-list="[detail.thumb]" fit="cover"
                              :src="detail.thumb" v-if="detail.thumb">
                    </el-image>
                    <div class="font-fifth" v-else>
                        暂无图片
                    </div>
                </el-descriptions-item>
                <el-descriptions-item label='状态' v-if="detailOver">
                    <el-tag v-if="detail.status == setting.status_list.disabled.value"
                            type="danger" effect="dark">
                        {{ '已' + detail.status_text }}
                    </el-tag>
                    <el-tag v-else-if="detail.status == setting.status_list.open.value"
                            type="success" effect="dark">
                        {{ '已' + detail.status_text }}
                    </el-tag>
                    <el-tag v-else type="info" effect="dark">
                        {{ '已' + detail.status_text }}
                    </el-tag>
                </el-descriptions-item>
                <el-descriptions-item label='排序'>
                    <span v-text="detail.sort"></span>
                </el-descriptions-item>
                <el-descriptions-item label='观看数'>
                    <span v-text="detail.view_num"></span>
                </el-descriptions-item>
                <el-descriptions-item label='收藏数'>
                    <span v-text="detail.collect_num"></span>
                </el-descriptions-item>
                <el-descriptions-item label='评论数'>
                    <span v-text="detail.comment_num"></span>
                </el-descriptions-item>
                <el-descriptions-item label='添加时间'>
                    <span v-text="detail.add_time_text"></span>
                </el-descriptions-item>
                <el-descriptions-item label='更新时间'>
                    <span v-text="detail.update_time_text"></span>
                </el-descriptions-item>
                <el-descriptions-item label='关键词'>
                    <span v-text="detail.keywords"></span>
                </el-descriptions-item>
                <el-descriptions-item label='是否原创' v-if='detailOver'>
                    <span v-text="detail.is_origin_text"></span>
                </el-descriptions-item>
                <el-descriptions-item label='转载地址'>
                    <span v-text="detail.reprint_url"></span>
                </el-descriptions-item>
                <el-descriptions-item label='简介'>
                    <span v-text="detail.description"></span>
                </el-descriptions-item>
            </el-descriptions>
            <h3>其他</h3>
            <el-card class="box-card w-100" shadow="never">
                <div slot="header" class="clearfix">
                    <span>附加数据</span>
                </div>
                <div v-if="detail.extra_data" id="extraDataShow"></div>
                <el-empty v-else description="暂无内容" image-size="70" class="no-p"></el-empty>
            </el-card>
            <el-card class="box-card w-100" shadow="never" style="width: 390px">
                <div slot="header" class="clearfix">
                    <span>设置</span>
                </div>
                <div v-if="detail.setting" id="settingShow"></div>
                <el-empty v-else description="暂无内容" image-size="70" class="no-p"></el-empty>
            </el-card>
            <el-card class="box-card w-100" shadow="never" style="width: 390px">
                <div slot="header" class="clearfix">
                    <span>文章内容</span>
                </div>
                <div v-if="detail.content" v-html="detail.content"></div>
                <el-empty v-else description="暂无内容" image-size="70" class="no-p"></el-empty>
            </el-card>
            <div class="form-bottom-free"></div>
        </el-main>
        <el-main class="content-wrapper transits bg-white" v-else>
            <el-empty v-if="isError" :description="errorMsg" class="mt-200"></el-empty>
        </el-main>
        <el-footer class="bottom-button" :height="50" v-if="pageDialog.isIframe">
            <el-button size="mini" type="danger" @click="cancel">
                返回
            </el-button>
        </el-footer>
    </el-container>
<?php

Asset::addCss($this, "/plugin/json-viewer/css/index.css");
Asset::addCss($this, "/css/backend/news-detail.css");
Asset::addScript($this, "/plugin/json-viewer/js/index.js");
Asset::addScript($this, "/js/backend/news-detail.js");

$this->registerJs('instance = new app();');

?>